﻿@inherits BFieldComponentBase<TValue>
@typeparam TValue
@{
    switch (Status)
    {
        case Status.UnChecked:
            _isChecked = string.Empty;
            _isIndeterminate = string.Empty;
            break;
        case Status.Checked:
            _isChecked = "is-checked";
            _isIndeterminate = string.Empty;
            break;
        case Status.Indeterminate:
            _isChecked = string.Empty;
            _isIndeterminate = "is-indeterminate";
            break;
    }
    <label role="checkbox" aria-checked="true" class="el-checkbox @_isChecked @isDisabled @Cls">
        <span aria-checked="mixed" class="el-checkbox__input @_isChecked @isDisabled @_isIndeterminate">
            <span class="el-checkbox__inner"></span>
            <input type="checkbox" aria-hidden="true" @onchange="ChangeStatus" class="el-checkbox__original @isDisabled" name="@Name" value="@Value" />
        </span>
        <span class="el-checkbox__label">
            @ChildContent
        </span>
    </label>
}